package edu.byu.intex2.data.bo;

import edu.byu.intex2.data.DataException;
import edu.byu.intex2.data.dao.TechnicianDAO;

/**
 * Technician Business Object
 * @author Brady White <satara@gmail.com>
 * @version 2009-03-08
 */
public class Technician extends Employee{
    private String serviceFacilityId;

    // TODO: getServiceFacility object

    /** Creates a new instance of BusinessObject */
    public Technician(String id) {
        super(id);
    }//constructor

    /** Convenience method to call the correct DAO to save this business object */
    @Override
    public void save() throws DataException {
        try {
            TechnicianDAO.getInstance().save(this);
        } catch (DataException e) {
            e.printStackTrace();
        }
    }

    /**
     * @return the serviceFacilityId
     */
    public String getServiceFacilityId() {
        return serviceFacilityId;
    }

    /**
     * @param serviceFacilityId the serviceFacilityId to set
     */
    public void setServiceFacilityId(String serviceFacilityId) {
        this.serviceFacilityId = serviceFacilityId;
        setDirty(true);
    }
}
